package com.atguigu.dubbo.service;

import com.alibaba.dubbo.config.annotation.Service;

import java.util.concurrent.TimeUnit;

/**
 * Dubbo的提供方案例
 *
 * 对外提供服务
 */
@Service(version = "1.0.1versionq",actives = 10)
public class UserServiceImpl implements UserService {

    private int i = 1;

    @Override
    public String sayHello(String name) {

       // try {
            //TimeUnit.SECONDS.sleep(2);
            System.out.println("重试:" + i++);
        //} catch (InterruptedException e) {
          //  e.printStackTrace();
       // }
        return "hello," + name;
    }
}
